/*
 * display.h
 *
 *  Created on: Sep 14, 2013
 *      Author: Ken Arok
 */

#ifndef DISPLAY_H_
#define DISPLAY_H_

#include <stdint.h>
#include "mydefs.h"
#include "timers_hw.h"


/** \brief Initialize LCD Display.
 *
 */
extern void vInitDisplay(void);

/** \brief Set Display/Cursor position.
 *
 * \param _row	Row position.
 * \param _col	Column position.
 *
 */
extern void vSetPositionDisplay(uint8_t _row, uint8_t _col);

/** \brief Put a character on the Screen.
 *
 * \param _row	Row position.
 * \param _col	Column position.
 * \param _char	A character to be displayed.
 *
 */
extern void vPutDisplay(uint8_t _row, uint8_t _col, const char _char);

/** \brief Print a string character on the Screen.
 *
 * \param _row		Row position.
 * \param _col		Column position.
 * \param _string	A string character to be displayed.
 *
 */
extern void vPrintDisplay(uint8_t _row, uint8_t _col, const char *_string);

/** \brief Clear screen.
 *
 * \defgroup DISPLAY_CLEAR vClearDisplay
 */
extern void vClearDisplay(void);

/** \brief Control the LCD display.
 *
 * \param _ctrl		Control command.
 *
 */
extern void vControlDisplay(const uint8_t _ctrl);

/** \brief Turn LCD Back Light ON/OFF.
 *
 * \param _on_off	ON/OFF option. iON = ON; iOFF = OFF
 * \param _val		Timer value (in _val * 0.5s) when action will be performed.
 */
extern void vTurnBackLightDisplay(uint8_t _on_off, uint32_t _val);

#endif /* DISPLAY_H_ */
